home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
fasttimelapse.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
2KB
|
93 lines
/*
* $VER: FastTimeLapse 1.00.00 (24.9.92)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* This program will capture a frame from any of the framegrabber
* modules at intervals, render and save the frames out to a
* 320x200 animation. This simply uses the Amiga preview
* to render frames as quickly as possible.
*
*/
OPTIONS RESULTS
/*
* We need this to ensure the animation is actually closed at the
* end, we will get signalled when the user aborts us:
*/
SIGNAL ON BREAK_C
/*
* Make sure we have a framegrabber-type scanner module.
*/
GetScanner
IF (result ~= 'FrameGrabber') & (result ~= 'FrameGrabber256') & (result ~= 'IVFG') THEN DO
RequestNotify 'This program requires a framegrabber module.'
SetScanner
IF rc ~= 0 THEN EXIT
END
/*
* And make sure we have the appropriate Preview module.
*/
GetPreview ; oldpreview = result
IF result ~= 'Amiga' THEN DO
SetPreview 'Amiga'
IF rc ~= 0 THEN EXIT
END
/*
* Get time lapse interval in seconds. Keep in mind that it may
* take a moment or two to capture a frame, render it, and then
* save it to an animation.
*/
RequestNumber '"Time Lapse Interval (Seconds):"' 0 600 10
IF rc ~= 0 THEN EXIT
lapse = result
/*
* Get output animation filename.
*/
RequestFile '"Output Animation Filename:"'
IF rc ~= 0 THEN EXIT
output = result
IF EXISTS(output) THEN DO
RequestResponse 'Output animation exists. Overwrite?'
IF rc ~= 0 THEN EXIT
ADDRESS COMMAND 'c:Delete >NIL:' output
END
/*
* Now loop until the user aborts the script.
*/
i = 1
DO FOREVER
Message 'Frame' i
i = i + 1
Scanner Grab
SavePreviewAs ANIM '"'output'"' Keep
IF lapse ~= 0 THEN ADDRESS COMMAND 'c:Wait' lapse
END
BREAK_C:
Message 'Closing Animation'
SavePreviewAs ANIM '"'output'"' Close
/*
* Restore the old preview.
*/
IF oldpreview ~= 'Amiga' THEN DO
SetPreview oldpreview
END
EXIT